import request from '../../../utils/request'

class SafetyCheckApi {
  query(data) {
    return request({
      url: '/safetycheck/list',
      method: 'get',
      data
    })
  }
  queryTree(data) {
    return request({
      url: `/department/list`,
      method: 'get',
      data
    })
  }
  queryByCond(data, pageSize, pageNum) {
    return request({
      url: `/safetycheck/queryByCond?pageSize=${pageSize}&pageNum=${pageNum}`,
      method: 'post',
      data
    })
  }
  add(data) {
    return request({
      url: '/safetycheck/add',
      method: 'post',
      data
    })
  }
  addPreshiftcheck(data){
    return request({
      url: '/preshiftcheck/add',
      method: 'post',
      data
    })
  }
  addMidshiftcheck(data){
    return request({
      url: '/midshiftcheck/add',
      method: 'post',
      data
    })
  }
  addPostshiftcheck(data){
    return request({
      url: '/postshiftcheck/add',
      method: 'post',
      data
    })
  }
  update(data) {
    return request({
      url: '/safetycheck/update',
      method: 'post',
      data
    })
  }
  updateBaoSignature(data) {
    return request({
      url: '/preshiftcheck/updateBaoSignature',
      method: 'post',
      data
    })
  }
  updateBaoSignaturePost(data) {
    return request({
      url: '/postshiftcheck/updateBaoSignature',
      method: 'post',
      data
    })
  }
  updateBaoSignatureMid(data) {
    return request({
      url: '/midshiftcheck/updateBaoSignature',
      method: 'post',
      data
    })
  }

  updateTingSignature(data){
    return request({
      url: '/postshiftcheck/updateTingSignature',
      method: 'post',
      data
    })
  }
  delete(data) {
    return request({
      url: '/safetycheck/delete',
      method: 'post',
      data
    })
  }
  getSafetycheck(params){
    return request({
      url: `/safetycheck/detail`,
      method: 'get',
      params
    })
  }
  getPreshiftcheckDetail(params){
    return request({
      url: `/preshiftcheck/detail`,
      method: 'get',
      params
    })
  }
  getMidshiftcheckDetail(params){
    return request({
      url: `/midshiftcheck/detail`,
      method: 'get',
      params
    })
  }
  getPostshiftcheckDetail(params){
    return request({
      url: `/postshiftcheck/detail`,
      method: 'get',
      params
    })
  }
}

export default new SafetyCheckApi()
